#include <iostream>
#include "demo_runner.h"
#include "utils_lib.h"

#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)

int main() {
    std::cout << "=== 工具库演示程序 ===" << std::endl;
    std::cout << "演示程序版本: " << TOSTRING(UTILS_DEMO_VERSION) << std::endl;
    std::cout << "工具库版本: " << TOSTRING(UTILS_LIB_VERSION) << std::endl;
    std::cout << std::endl;
    
    DemoRunner runner;
    
    try {
        // 演示字符串工具
        std::cout << "=== 字符串工具演示 ===" << std::endl;
        runner.demonstrateStringUtils();
        
        // 演示文件工具
        std::cout << "\n=== 文件工具演示 ===" << std::endl;
        runner.demonstrateFileUtils();
        
        // 演示时间工具
        std::cout << "\n=== 时间工具演示 ===" << std::endl;
        runner.demonstrateTimeUtils();
        
        std::cout << "\n工具库演示完成!" << std::endl;
        
    } catch (const std::exception& e) {
        std::cerr << "演示过程中发生错误: " << e.what() << std::endl;
        return 1;
    }
    
    return 0;
}